package com.cl.utils;

public class MegUtil {
    private String info;
    private int code;

    @Override
    public String toString() {
        return "Meg{" +
                "info='" + info + '\'' +
                ", code=" + code +
                '}';
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public MegUtil(String info, int code) {
        this.info = info;
        this.code = code;
    }
    public MegUtil() {
    }

    public static MegUtil fail(String info){
        MegUtil meg = new MegUtil();
        meg.setCode(500);
        meg.setInfo(info);
        return meg;
    }
    public static MegUtil success(String info){
        MegUtil meg = new MegUtil();
        meg.setCode(200);
        meg.setInfo(info);
        return meg;
    }
}
